package com.dk.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * 变量实体类
 */
@Data
public class VarEntity{
    @ExcelProperty("Key(变量名)")
    @NotNull(message = "Key(变量名)不能为空")
    @Pattern(regexp = "\\$\\{(.*?)}",message = "Key(变量名)不符合规则,格式:${key}")
    @Size(max = 100,message = "Key(变量名)不得超过100位")
    public String key;

    @ExcelProperty("Value(变量值)")
    @NotNull(message = "Value(变量值)不能为空")
    @Size(max = 1000,message = "Value(变量值)不得超过1000位")
    public String value;

    @ExcelProperty("Remark(备注)")
    @Size(max = 50,message = "Remark(备注)不得超过50位")
    public String remark;

}
